package cassys.actions.assessmentManagement;

import cassys.domain.assessment.Assessment;
import com.opensymphony.xwork2.ActionSupport;
import cassys.ejb.clients.AssessmentManagementDelegate;
import java.util.List;

/**
 *
 * @author User
 */
public class ListAssessments extends ActionSupport {

    private AssessmentManagementDelegate assessmentDelegate;
    private List<Assessment> assessmentList;

    public ListAssessments() {
        assessmentDelegate = new AssessmentManagementDelegate();
    }

    @Override
    public String execute() throws Exception {
        System.out.println("ListAssessments");
        this.assessmentList = assessmentDelegate.getAllAssessments();
        System.out.println("got the ListAssessments");
        return SUCCESS;
    }

    public List<Assessment> getAssessmentList() {
        return assessmentList;
    }
}
